package com.heima.user.util;

import com.heima.model.user.entity.ApUser;

public class AppThreadLocalUtil {
    private final static ThreadLocal<ApUser> USER_THREAD_LOCAL = new ThreadLocal<>();

    public static void setApUser(ApUser apUser){
          USER_THREAD_LOCAL.set(apUser);
    }
    public static ApUser getApUser(){
        return USER_THREAD_LOCAL.get();
    }

    public static void clear(){
        USER_THREAD_LOCAL.remove();
    }
}
